add function for console