added behaviour definition, error fixes