Added activity functions and result retrieval function