added clock; minor changes-