worked on resize functions