Moved logic to decorator