fixed coding problem