updated with Neema's changes and comments