renamed method, added some comments