Add function for debug