first logic and gui components