separated code each compornents.