Added more code for EXEC and Join