added weight base thing and unit tests