Added the inherit method to this code and successfully implimented it