creating a versatile code executor with an advanced api