Changed to use protoypes