implement list methods for js