working model, few bugs