implements Square#setFlag method