refactor shapes