updates to fx3 code. Almost working