Added digit and non-digit cases and hard coded to pass tests