Original version with 5 commands