added function prototypes