refactored anaLine