Tidied up by using pipe operator