can't make function work, added input to script