use css classes instead of duplicate code