eliminates numpy dependency