Added test for function