Added persist functionality