added consexpr to some short functions