compass and connection code working