added code for square popup