adding functions

These are some functions for line analysis