merged in Akshay's tool