adds some logic and style