implemented lookat function.