completely working version of express implementaion