debugs helper functions