corrected db model
implemented checkout