create function to push square id to array