some alterations to make a better user interface and solve some bugs