debugged cart incrementing funciton