feat: final implementation, include better tests