added method to set single component of direction