Added some pure functions