class with prototype to prepare typescript version