logic and Alex fix