added tests, this needs to be enhanced