Added new functions, unit & mock tests