flexible assign function attempt