This is a good start, except for the fact it's throwing a null pointer exception.