added resize menu function