added hsp compatible features and incomplete default argument support