implemented fuctionality