add function option to subscribe for better reactive handling