edited code
added more  features