disassemble script into smaller parts for a better overview