improved various utils