added tests
return value fixes