Added more tests. All functions implemented