Added geokit-rails3 and avg logic