added logic to assign slot values