managed to separate the css from the logic