logic and gui were partly implemented