added in invite gem and adjusted to work with current system