Quick implementation. Not sure if we're allowed to use a libaray