Finished implementation, needs testing and debugging as it is not yet
working