rebased code from svn source to clean up mistates remember all code belongs to their respective creaters