complete model and dao layer