Adapted code to Virtual Server