Finished preliminary implementation