Moved require statement to the right place