Added input parsing