fixed compare function
consistant function naming
Implemented Behavior::attach()