made a few changes to add more features