major functions added