Moved logic out of properties for better coding practice