rect gen works