adding my first snippet

failed in a for loop once it could not make a connection