change output to most recently completed week, change input format, more error checking