change method of calculate fps