fixing union square logic