updated here
added decorator functionality