Made the input more general