added new functionality and mock test