using the variable gps over wrote the gps api

also fixed writeOut