simple pwd implementation