moved logic

now in model