deleted old function
adjusted comments