use full path
simplify random code