Added separation logic for input into kernel