added fallback for unincluded parameters
added error checking