Adding defrag api