implement features in javascript