switched to more compatible function syntax