added pure function
added implementation of pure function