added basic inheritance, and fixed a bug
got basic inheritance working