added general execute function