Logic appears to work