started to refactor gui