updated box code for more responsive boxes