added server code
changed nav from directive