all functionality transfer to classes
changes templates