Final commit for tha algorithm, design is temporary as well