function for vector for output devices corrected