constraints functions and fix connection requests