finished the simplified version