comment and efficiency

commented code and changed square values for efficiency