adds  method to get rate of a file