correct functions and add tests