added square and cube handler