more functionality and tests