moved IO code in mainscreen