ui fixed, refactoring needed