removed warnings by using the right types