wrote code for reading settings and options in new functions