added purchases model and controller