cleaned up the source a bit to make it more error-hander friendly
cleaned up the source a bit to make it more error-hander friendly
merge from testing