added clock
improved fdm