straightened out intervals, started adding some documentation