Tidier implementation