cleaning up a bit based on jason reco