commiting an extra credit solution that kind of works