got local structs working and functions inside local structs semi working