added styling logic