renamed several methods for better understanding