added tests and finished glob support