Added the rmi part of the assignment. Note: Some changes must be made