minnor changes
simple rate runction calculated