fixed bugs and updated UI