now code is proper