updated models
fixed bugs
working version