Improved logic