added tests and rfct