Quandoo Interview Question

refactor a code and add functionality