adding condition check to style