added rand to kernal