cleaning up get code