Improved ll implementation