fixed includes
added squared function
expanded squared
modified squared
feature merged
added proper comments for function