Modified to follow database result.