Moved helper logic into decorator