finished most of the functionality according to class
all works on browser! complete, for now