Happy with its function
take out debug type output