rewrite to use gulp behind the scenes