get rid of untyped code in Sys