very skeletal javascript prototype