updated UI and fixed some bugs