added a lot more functionality but still a lot more work to do