few corrections,
starting to write better function for finding minima in projection