Added subscribe function