Add pos as argument to function