merged code by FS