clean up code, add subscribe service