worked out bugs