cos-sin table save...unworking version