added some files and finished model and controller