added pos dependency
basic input/output loop