added inludes; endl/cout -> std::endl/cout