added a neater version