moved something for better logic