function wrapping
merged changes