update with bug fixing