added conditions
added TODO