starting code, messy from other scripts