created helper folder and moved code to "helper/LWRfunctions.R"