logan's code