fixed interval code