move functions and readin functionality