refactored for std vector
totally broken- render cleanup