bug fixing, util methods implemented