initial work for rewriting the rectangular element