more final commit, way better version, though still many bugs