move to std array, remove a few lines of code