add masking, make dtype int
quick and dirty fix need to make cleaner
quick fix for array dims