Updated Code to add more features