implemented cat functionality