added function prototypes + build