Adding changes to return the type