correcting test logic