moved some more logic into behavior