Old, working code reimplemented untill new headbehaviour tested and trained