Added activity creation function