Added test functionality