code cleaning + add dependency