reformatted code becouse ugly