fixed cron function to update rates
optimizing insert_rates function
started working on getting rates per site and stored in js object where it will be ready for easy access