everything working still, added a bit more functionality, still need to comment it