added code to comply with tests