Done for competition, needs to be made more robust