Added my own filter and map functions
added type definition