minor changes in method 2 and 3, I think they will work from now on