From 50 lines to 30 lines code