put view inside createPicker function