made popup open smoothly