updates to add more functionality and tests