profile cleanup
optimize this and that
following logic moved to tempalte
tinkering