added optimization flag
improved commenting