makes copy the lot button work

updates collapse function.