removed repeated code from styles