replace with system() call