commented out bugous functions
added return calues to int functions