moved logic tu external model