optimize some of code