slight code changes