Found some bugs fixed them and added a feature