updated log method and added indexes method