End to end working code (no DB)