moved logic to bin