behavior structure added
fixed an arithmatic error