refactor derive function
debug messages working
post-processing working
making html templates working