unimpl function removed, srand() call added