added some behaviors and changed some structure