added a handler for resize events in order to fit display area