master updated code for multiple systems