new version for Merge pull request from thatpixguy