fixed #7 refactored to optionally return Promises. organized tests to do both.