scrript and functions are working, result seems wrong