implement compile task, but including some TODO