renamed some methods, reindented with 4 spaces.