refactor code to use std::vector and start trying to accomodate integers instead of just natural numbers