refined it a bit