began abstraction of js