Simplifying and renaming execute function