inline -> func
misc tweaks