using fork/exec insted system()