added logic and basic styling