clean up format rule retrieval logic