put all logic into the basedata