added comments and renamed methods: