made several functions constexpr