worked on tests and function binding