changed reference from pass obj param to this for methods.each fucntion