Reimplented logic