improving modalbox