implemented question #5!!