adding better code practice changes