@farhunt: here is my attempt