made code more dry, styling