improved version with simple fib constraint added