BF possibly better logic. need to test