implementing exec