added tests and fixed buggy requests