createpin code + UI