Code organized and working fine