working. also added getrange method. adding comments