working on tests and bug solving