finished main functionality ready for qa