added checkout. TODO:commit to db