refactoring:
removed unused code,
renamed variable