added new code to test logic