Tryed to make the functions work with the main project, might need some help though