fixed argument checking so passing y is optional.