made necessarry gem modifications