please add jasmine unit tests for this