Added time.time() for measuring time