Made this as part of a university assignment, might be useful later