updated for screen resize