fixed an import error in order and added tests

fixes issue #38 and adds a test

@girasquid @RichardBlair 
cc/ @marcvanolmen