added ismple logic here and there. no big things