implemented rmrf without using async