extract system functions to a seperate package