add realpath() to run program properly