created UI and adjusted code