Added check for random

Should close #34