code simplified. there is a method for everything.