added tests for this crap