making sharable functions